package service

import (
	"gin/types"
	"github.com/gin-gonic/gin"
)

type Role struct {
}

func (c *Role) Find(ctx *gin.Context, roleCode string) (res types.RoleFindRes, err error) {
	var req = types.RoleFindReq{}
	req.Param.Filter.Code = roleCode
	var headers = map[string]string{"x-userinfo": GetStringFromContext(ctx, "x-userinfo")}
	err = tr.Do("teamones-im", "role/find", req, headers, &res)
	return
}
